#include "Node.h"
#include "Edge.h"
#include "RTree.h"
#include "Rect.h"
#include "Answer.h"
#include "Constant.h"
#include <iostream>
#include <map>

#if !defined(LOAD_H)
#define LOAD_H
using namespace std; 

class Load
{
protected:
	map<int, Node> list_node;  //store all information of WA_Node
	map<int, Edge> list_edge; //store all information od WA_Edge
	RTree<int, double, 2, double> tree;  //store edge information in R-tree

	void __001_fixStringNum(char* num, int fixDigit);
	map<int, char*> __002_myStrtok(char *stringList, char *delimiter);
	void __003_insertToRtree(Edge storeEdge, int inIndex);
	double __004_countPointToLineDistant(Node node, Node edge_node1, Node edge_node2);
public:
	Load();
	~Load();
	void ACT001_loadWA_Node(char* filePath);
	void ACT002_loadWA_Edge(char *filePath_edge, char *filePath_edgeGeometry);
	Ans ACT003_getSearchResult(Node node);
	map<int, Node> GET001_list_node();
};

#endif